<template>
  <!-- 此处为入口 公共部分可以放到这里 -->
  <div id="app">
    <publicHeader></publicHeader>
    <router-view :style="{'height': height + 'px'}"/>
  </div>
</template>

<script>
import publicHeader from '@/components/common/publicHeader'
import error from '@/services/error'

export default {
  name: 'app',
  components: {
    publicHeader
  },
  computed: {
    height() {
      return document.documentElement.clientHeight - 46
    }
  },
  mounted() {
    // 全局错误初始化
    error.init.call(this)
  }
}
</script>

<style>
#app {
  font-family: "Microsoft YaHei Bold", "Microsoft YaHei Regular", "Microsoft YaHei";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #333;
  padding: 0;
  margin: 0;
  height:100%;
  overflow: hidden;
  min-width: 1200px;
  background-color:#f9f9f9;
}
</style>
